package com.huabo.contract.oracle.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

@Table(name = "TBL_STAFF")
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class TblStaff {
    public final static Integer USER_DISABLE=0;//禁用
    public final static Integer USER_ENBLE=1;//启用

    public final static String REGISTERUSERPASSWORD = "12345678";

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
    @TableId("STAFFID")
    private BigDecimal staffid;//主键ID,自动增长
    @TableField("REALNAME")
    private String realname;//真实名字
    @TableField("FIXEDPHONE")
    private String fixedphone;//固定电话
    @TableField("ADDRESS")
    private String address;//地址
    @TableField("EMAIL")
    private String email;//邮箱
    @TableField("MIBLEPHONE")
    private String miblephone;//手机号码
    @TableField("MEMO")
    private String memo;//备注
    @TableField("USERNAME")
    private String username;//用户名（登录名）
    @TableField("PASSWORD")
    private String password;//密码
    @TableField("JOBID")
    private BigDecimal jobid;//岗位ID
    @TableField("CREATETIME")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date createtime;
    @TableField("STATUS")
    private Integer status;//状态（1启用，0弃用）
    @Transient
    private TblRole  trole;
    //private TblOrganization tblOrganization;//组织ID
    @TableField("ORGID")
    private BigDecimal orgid;//组织Id
    @TableField("OUTSIDEID")
    private Integer outSideId; //标识用户来源 为null是本系统，1：蜂信，2,蜂信购买后的用户   3：华博云系统注册用户管理员  以后可能为2,3...来表示其它来源
    @TableField("OUTSIDEOPENID")
    private String outSideOpenId; //外部同步企业来源Id
    @Transient
    private String orgName;
    @Transient
    private String jobName;
    @Transient
    private String orgFatherName;
    @Transient
    private String rn;
    @Transient
    private String checked;
	@TableField("HISTORYCODE")
	@ApiModelProperty(value = "历史id")
	private String historycode;//
	@TableField("DINGID")
	@ApiModelProperty(value = "钉钉id")
	private String dingid;//
	@TableField("POSTNAME")
	@ApiModelProperty(value = "职位")
	private String postname;//
	@TableField("ISMAINPOST")
	@ApiModelProperty(value = "是否主职")
	private String ismainpost;//
	@TableField("STATION")
	@ApiModelProperty(value = "岗位")
	private String station;//
	@TableField("PK_MDM")
	@ApiModelProperty(value = "ncc主键")
	private String pk_mdm;//
	@TableField("MDM_CODE")
	@ApiModelProperty(value = "ncc编码")
	private String mdm_code;
	@TableField("DATASOURCE")
	@ApiModelProperty(value = "数据来源")
	private String datasource; //
	
	@TableField("MANAGEORGS")
	@ApiModelProperty(value = "管理部门的id串")
	private String manageorgs;
	@TableField("MANAGEORGNAMES")
	@ApiModelProperty(value = "管理部门名称")
	private String manageorgnames;
	@TableField("FGORGS")
	@ApiModelProperty(value = "分管部门id")
	private String fgorgs;
	@TableField("FGORGNAMES")
	@ApiModelProperty(value = "分管部门名称")
	private String fgorgnames;
	
    @Transient
    private TblOrganization linkDetp;//用户隶属的部门
    @Transient
    private TblOrganization currentOrg;//用户当前所在的公司
    @Transient
    private TblOrganization linkOrg;//用户隶属的公司
    @Transient
    private TblLoginType loginType;//登录页面信息





}

